package com.wcgksoft.entity.Att_management;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wcgksoft.entity.system.Enterprise;
import org.hibernate.annotations.Cascade;

import javax.persistence.*;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: 周权
 * @Date: 2020/03/18/13:18
 * @Description:健康系统逐日统计
 */
@Entity
@Table(name = "t_Healthy_statistics")
public class Healthy_statistics {
    /**
     * id
     */
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Integer id;

    /**
     * 队伍名称
     */
    @Column(name = "S_team")
    private String s_team;


    /**
     * 健康统计时间
     */
    @JsonFormat(pattern="yyyy-MM-dd")
    @Column(name = "createDate")
    private Date s_createDate;

    /*
     * 非健康人数
     * */
    @Column(name = "S_no_num")
    private Integer s_no_num;

    /*
     * 健康录入人数
     * */
    @Column(name = "S_num")
    private Integer s_num;

    /*
     * 占比
     * */
    @Column(name = "S_proportion")
    private Double s_proportion;

    /*
     * 队伍实到人数
     * */
    @Column(name = "S_teamnum")
    private Integer s_teamnum;

    /*
     * 施工团队ID
     * */
    @Column(name = "S_tid")
    private Integer s_tid;

    /**
     * 企业ID
     */
    @Column(name = "S_eid")
    private Integer s_eid;

    /**
     * 项目ID
     */
    @Column(name = "S_project_id")
    private Integer s_project_id;

    /**
     * 片区ID
     */
    @Column(name = "S_area_id")
    private Integer s_area_id;

    /**
     * 施工队伍考勤表
     */
    @OneToOne(fetch = FetchType.EAGER, optional = true)
    @JoinColumn(name = "att_management_id", nullable = true)
    @Cascade({org.hibernate.annotations.CascadeType.REFRESH})
    private Att_management att_management;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getS_team() {
        return s_team;
    }

    public void setS_team(String s_team) {
        this.s_team = s_team;
    }

    public Date getS_createDate() {
        return s_createDate;
    }

    public void setS_createDate(Date s_createDate) {
        this.s_createDate = s_createDate;
    }

    public Integer getS_no_num() {
        return s_no_num;
    }

    public void setS_no_num(Integer s_no_num) {
        this.s_no_num = s_no_num;
    }

    public Integer getS_num() {
        return s_num;
    }

    public void setS_num(Integer s_num) {
        this.s_num = s_num;
    }

    public Double getS_proportion() {
        return s_proportion;
    }

    public void setS_proportion(Double s_proportion) {
        this.s_proportion = s_proportion;
    }

    public Integer getS_teamnum() {
        return s_teamnum;
    }

    public void setS_teamnum(Integer s_teamnum) {
        this.s_teamnum = s_teamnum;
    }

    public Integer getS_tid() {
        return s_tid;
    }

    public void setS_tid(Integer s_tid) {
        this.s_tid = s_tid;
    }

    public Integer getS_eid() {
        return s_eid;
    }

    public void setS_eid(Integer s_eid) {
        this.s_eid = s_eid;
    }

    public Integer getS_project_id() {
        return s_project_id;
    }

    public void setS_project_id(Integer s_project_id) {
        this.s_project_id = s_project_id;
    }

    public Integer getS_area_id() {
        return s_area_id;
    }

    public void setS_area_id(Integer s_area_id) {
        this.s_area_id = s_area_id;
    }

    public Att_management getAtt_management() {
        return att_management;
    }

    public void setAtt_management(Att_management att_management) {
        this.att_management = att_management;
    }
}
